with open('./model.h', 'w') as f:
    f.write('const unsigned char model[] = {\n')
    
    with open('model.tflite', 'rb') as model_file:
        model_data = model_file.read()
        
    for i in range(len(model_data)):
        f.write(f'0x{model_data[i]:02X}')
        if i < len(model_data) - 1:
            f.write(', ')
        if (i + 1) % 16 == 0:
            f.write('\n')
    
    f.write('\n};')